<?php
/*************************************************************************************

   Google Maps Module by breitsch (mail@casa-loca.com)

*************************************************************************************/

// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
   die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------

echo '<p class="title">Google Maps Module 3.0 Setup</p>';

// ceate main db table
$sql = "CREATE TABLE IF NOT EXISTS `".DB_PREPEND."phpwcms_googlemaps` (
  `googlemaps_id` int(11) NOT NULL auto_increment,
  `googlemaps_created` datetime NOT NULL default '0000-00-00 00:00:00',
  `googlemaps_changed` datetime NOT NULL default '0000-00-00 00:00:00',
  `googlemaps_title` text NOT NULL,
  `googlemaps_lon` varchar(255) NOT NULL default '',
  `googlemaps_lat` varchar(255) NOT NULL default '',
  `googlemaps_text` mediumtext NOT NULL,
  `googlemaps_marker` varchar(255) NOT NULL default '',
  `googlemaps_articleid` MEDIUMTEXT NOT NULL,
  `googlemaps_template` int(11) NOT NULL default '0',
  `googlemaps_cat` VARCHAR(255) NOT NULL,
  `googlemaps_object` mediumtext NOT NULL,
  `googlemaps_kml` int(1) NOT NULL default '0',  
  `googlemaps_status` int(1) NOT NULL default '0',
  `googlemaps_searchlisting` MEDIUMTEXT NOT NULL,
  PRIMARY KEY  (`googlemaps_id`),
  KEY `googlemaps_status` (`googlemaps_status`)
)TYPE=MyISAM"._dbGetCreateCharsetCollation();

if (mysql_fetch_row(mysql_query('SHOW TABLES FROM ' . $GLOBALS['phpwcms']['db_table'] . ' LIKE "%phpwcms_googlemaps"'))) {
    echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/icon_alert.gif" alt="" />Database table <b>Points</b> already installed</p>';
    //update 
    if (mysql_query( 'SHOW COLUMNS FROM ' . $GLOBALS['phpwcms']['db_table'] . ' LIKE "%googlemaps_searchlisting"') === false) {
      $sql2 = "ALTER TABLE `".DB_PREPEND."phpwcms_googlemaps` ADD `googlemaps_searchlisting` MEDIUMTEXT NOT NULL";
      if(@mysql_query($sql2)) {
        echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/icon_accept.gif" alt="" />Database table <b>Points</b> updated</p>';
      }
    }
}else if(_dbQuery($sql, 'CREATE')) { //create table  
    echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/icon_accept.gif" alt="" />Database table <b>Points</b> created</p>';
} else {
	echo '<p class="error"><img src="'.$phpwcms['modules'][$module]['dir'].'img/action_stop.gif" alt="" />Error creating <b>Google Maps Module</b> initial database table:</p>';
	echo '<p>'.@htmlentities(@mysql_error(), ENT_QUOTES, PHPWCMS_CHARSET).'</p>';
}

// ceate key db table - no changes from v2.0 to v3.0
$sql = "CREATE TABLE IF NOT EXISTS `".DB_PREPEND."phpwcms_googlekey` (
  `googlekey_id` int(11) NOT NULL auto_increment,
  `googlekey_created` datetime NOT NULL default '0000-00-00 00:00:00',
  `googlekey_changed` datetime NOT NULL default '0000-00-00 00:00:00',
  `googlekey_key` text NOT NULL,
  `googlekey_version` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`googlekey_id`)
)TYPE=MyISAM"._dbGetCreateCharsetCollation();

if (mysql_fetch_row(mysql_query('SHOW TABLES FROM ' . $GLOBALS['phpwcms']['db_table'] . ' LIKE "%phpwcms_googlekey"'))) {
  echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/icon_alert.gif" alt="" />Database table <b>Key</b> already installed</p>';
}else if(_dbQuery($sql, 'CREATE')) {
  echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/icon_accept.gif" alt="" />Database table <b>Key</b> created</p>';
} else {
	echo '<p class="error"><img src="'.$phpwcms['modules'][$module]['dir'].'img/action_stop.gif" alt="" />Error creating <b>Google Maps Module Key</b> initial database table:</p>';
	echo '<p>'.@htmlentities(@mysql_error(), ENT_QUOTES, PHPWCMS_CHARSET).'</p>';
}

// ceate categories db table - new in v3.0
$sql = "CREATE TABLE IF NOT EXISTS `".DB_PREPEND."phpwcms_googlemaps_categories` (
  `cat_id` int(10) unsigned NOT NULL auto_increment,
  `cat_type` varchar(255) NOT NULL default '',
  `cat_pid` int(11) NOT NULL,
  `cat_status` int(1) NOT NULL default '0',
  `cat_createdate` datetime NOT NULL default '0000-00-00 00:00:00',
  `cat_changedate` datetime NOT NULL default '0000-00-00 00:00:00',
  `cat_name` varchar(255) NOT NULL default '',
  `cat_info` text NOT NULL,
  PRIMARY KEY  (`cat_id`),
  KEY `cat_type` (`cat_type`,`cat_status`)
)TYPE=MyISAM"._dbGetCreateCharsetCollation();

if (mysql_fetch_row(mysql_query('SHOW TABLES FROM ' . $GLOBALS['phpwcms']['db_table'] . ' LIKE "%phpwcms_googlemaps_categories"'))) {
  echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/icon_alert.gif" alt="" />Database table <b>Categories</b> already installed</p>';
}else if(_dbQuery($sql, 'CREATE')) { //create table

  $sql3 = "ALTER TABLE `".DB_PREPEND."phpwcms_googlemaps_categories` ADD INDEX ( `cat_pid` )";
  @mysql_query($sql3); //add index
  $sql3 = "ALTER TABLE `".DB_PREPEND."phpwcms_googlemaps_categories` AUTO_INCREMENT =2";
  @mysql_query($sql3); //add index

  echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/icon_accept.gif" alt="" />Database table <b>Categories</b> created</p>';
    $result3 = array();
    //get existing categories from v2.0
    $sql2 = "SELECT googlemaps_cat FROM ".DB_PREPEND."phpwcms_googlemaps";
		$googlemaps['cat'] = _dbQuery($sql2);
      if($googlemaps['cat']){
        
        foreach ($googlemaps['cat'] as $key=>$value) {
          if ($googlemaps['cat'][$key]['googlemaps_cat']) $result3[$key] = $googlemaps['cat'][$key]['googlemaps_cat'];
            $result3 = array_unique($result3);
        }
      }
    if ($result3) {
      //each category will now be a first level category and activated
      $update['cat_changedate']	= time();
      $update['cat_status']		= 1;
      $update['cat_pid']			= 0;
    
      foreach ($result3 as $key=>$value) {
        
        $sql  = 'INSERT INTO '.DB_PREPEND.'phpwcms_googlemaps_categories (';
				$sql .= 'cat_type, cat_pid, cat_createdate, cat_changedate, cat_status, cat_name';
				$sql .= ') VALUES (';
				$sql .= "'module_googlemaps', ";
				$sql .= $update['cat_pid'].', ';
				$sql .= "'".aporeplace( date('Y-m-d H:i:s', $update['cat_changedate']) )."', ";			
				$sql .= "'".aporeplace( date('Y-m-d H:i:s', $update['cat_changedate']) )."', ";
				$sql .= $update['cat_status'].", ";
				$sql .= "'".aporeplace($value)."'";
				$sql .= ')';
			  
				$result = _dbQuery($sql, 'INSERT'); //insert cateogry
				
				if( !empty($result['INSERT_ID']) ) {
					$update['cat_id']	= $result['INSERT_ID'];
				}
				
				$sql2  = 'UPDATE '.DB_PREPEND.'phpwcms_googlemaps SET ';
				$sql2 .= "googlemaps_cat = ".$update['cat_id']." ";
				$sql2 .= "WHERE googlemaps_cat='".aporeplace($value)."'";
				
				_dbQuery($sql2, 'UPDATE'); //change main table category value
      }
    }
  echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/icon_accept.gif" alt="" />Database table <b>Categories</b> filled with existing categories</p>';
} else {
	echo '<p class="error"><img src="'.$phpwcms['modules'][$module]['dir'].'img/action_stop.gif" alt="" />Error creating <b>Google Maps Module Categories</b> initial database table:</p>';
	echo '<p>'.@htmlentities(@mysql_error(), ENT_QUOTES, PHPWCMS_CHARSET).'</p>';
}

// ceate language db table - new in v3.0
$sql = "CREATE TABLE IF NOT EXISTS `".DB_PREPEND."phpwcms_googlemaps_language` (
  `gm_lang_id` int(10) unsigned NOT NULL auto_increment,
  `gm_lang_status` int(1) NOT NULL default '0',
  `gm_lang_createdate` datetime NOT NULL default '0000-00-00 00:00:00',
  `gm_lang_changedate` datetime NOT NULL default '0000-00-00 00:00:00',
  `gm_lang_name` varchar(255) NOT NULL default '',
  `gm_lang_loc` varchar(255) NOT NULL default '',
  `gm_lang_sys` varchar(255) NOT NULL default '',
  `gm_lang_lang` text NOT NULL,
  PRIMARY KEY  (`gm_lang_id`)
)TYPE=MyISAM"._dbGetCreateCharsetCollation();

if (mysql_fetch_row(mysql_query('SHOW TABLES FROM ' . $GLOBALS['phpwcms']['db_table'] . ' LIKE "%phpwcms_googlemaps_language"'))) {
  echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/icon_alert.gif" alt="" />Database table <b>Language</b> already installed</p>';
}else if(_dbQuery($sql, 'CREATE')) {//create table
  echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/icon_accept.gif" alt="" />Database table <b>Language</b> created</p>';

  $sql = "INSERT INTO `".DB_PREPEND."phpwcms_googlemaps_language` (
`gm_lang_status` ,
`gm_lang_createdate` ,
`gm_lang_changedate` ,
`gm_lang_name` ,
`gm_lang_loc` ,
`gm_lang_sys` ,
`gm_lang_lang`
) VALUES (1, '2008-07-13', '2008-07-13', 'English', 'en', '0', '";
	$plugin['data']['lang']['gm_lang_rpl']			= "get directions";		
	$plugin['data']['lang']['gm_lang_adr']			= "address";
	$plugin['data']['lang']['gm_lang_toh']			= "to here";
	$plugin['data']['lang']['gm_lang_frh']			= "from here";
	$plugin['data']['lang']['gm_lang_sea']			= "search map";
	$plugin['data']['lang']['gm_lang_pri']			= "print";
	$plugin['data']['lang']['gm_lang_cle']			= "clear";
	$plugin['data']['lang']['gm_lang_rad']			= "search";
	$plugin['data']['lang']['gm_lang_dis']			= "distance";
	$plugin['data']['lang']['gm_lang_gdr']			= "get directions";
	$plugin['data']['lang']['gm_lang_sad']			= "start address";
	$plugin['data']['lang']['gm_lang_ead']			= "end address";
	$plugin['data']['lang']['gm_lang_nor']			= "no results found";
	$plugin['data']['lang']['gm_lang_tabc']			= "categories";
	$plugin['data']['lang']['gm_lang_tabr']			= "directions";
	$plugin['data']['lang']['gm_lang_tabs']			= "search";
	$plugin['data']['lang']['gm_lang_tdtx']			= "info";
  $plugin['data']['lang']['gm_lang_tdli']			= "listing";
	$plugin['data']['lang']['gm_lang_tstx']			= "info";
  $plugin['data']['lang']['gm_lang_tsli']			= "listing";
  $sql .= serialize($plugin['data']['lang']);
  $sql .= "'),
(1, '2008-07-13', '2008-07-13', 'Spanish', 'es', '1', '";
	$plugin['data']['lang']['gm_lang_rpl']			= "C&oacute;mo llegar";		
	$plugin['data']['lang']['gm_lang_adr']			= "Direcci&oacute;n";
	$plugin['data']['lang']['gm_lang_toh']			= "hasta aqui";
	$plugin['data']['lang']['gm_lang_frh']			= "desde aqui";
	$plugin['data']['lang']['gm_lang_sea']			= "Buscar en";
	$plugin['data']['lang']['gm_lang_pri']			= "Imprimir";
	$plugin['data']['lang']['gm_lang_cle']			= "Quitar";
	$plugin['data']['lang']['gm_lang_rad']			= "Buscar";
	$plugin['data']['lang']['gm_lang_dis']			= "Distancia";
	$plugin['data']['lang']['gm_lang_gdr']			= "C&oacute;mo llegar";
	$plugin['data']['lang']['gm_lang_sad']			= "Direcci&oacute;n de origen";
	$plugin['data']['lang']['gm_lang_ead']			= "Direcci&oacute;n de destino";
	$plugin['data']['lang']['gm_lang_nor']			= "ningun resultado encontrado";
	$plugin['data']['lang']['gm_lang_tabc']			= "Categor&iacute;as";
	$plugin['data']['lang']['gm_lang_tabr']			= "C&oacute;mo llegar";
	$plugin['data']['lang']['gm_lang_tabs']			= "B&uacute;squeda";
	$plugin['data']['lang']['gm_lang_tdtx']			= "Info";
  $plugin['data']['lang']['gm_lang_tdli']			= "Lista";
	$plugin['data']['lang']['gm_lang_tstx']			= "Info";
  $plugin['data']['lang']['gm_lang_tsli']			= "Lista";
  $sql .= serialize($plugin['data']['lang']);
  $sql .= "'),
(1, '2008-07-13', '2008-07-13', 'French (France)', 'fr', '1', '";
	$plugin['data']['lang']['gm_lang_rpl']			= "Itin&eacute;raires";		
	$plugin['data']['lang']['gm_lang_adr']			= "Adresse";
	$plugin['data']['lang']['gm_lang_toh']			= "vers ce lieu";
	$plugin['data']['lang']['gm_lang_frh']			= "a partir de ce lieu";
	$plugin['data']['lang']['gm_lang_sea']			= "Rechercher";
	$plugin['data']['lang']['gm_lang_pri']			= "Imprimer";
	$plugin['data']['lang']['gm_lang_cle']			= "Supprimer";
	$plugin['data']['lang']['gm_lang_rad']			= "Rechercher";
	$plugin['data']['lang']['gm_lang_dis']			= "Distance";
	$plugin['data']['lang']['gm_lang_gdr']			= "Itin&eacute;raires";
	$plugin['data']['lang']['gm_lang_sad']			= "Lieu de d&eacute;part";
	$plugin['data']['lang']['gm_lang_ead']			= "Lieu d&#39;arriv&eacute;e";
	$plugin['data']['lang']['gm_lang_nor']			= "aucun r&eacute;sultat trouv&eacute;";
	$plugin['data']['lang']['gm_lang_tabc']			= "Categorie";
	$plugin['data']['lang']['gm_lang_tabr']			= "Itin&eacute;raires";
	$plugin['data']['lang']['gm_lang_tabs']			= "Rechercher";
	$plugin['data']['lang']['gm_lang_tdtx']			= "Info";
  $plugin['data']['lang']['gm_lang_tdli']			= "Liste";
	$plugin['data']['lang']['gm_lang_tstx']			= "Info";
  $plugin['data']['lang']['gm_lang_tsli']			= "Liste";
  $sql .= serialize($plugin['data']['lang']);
  $sql .= "'),
(1, '2008-07-13', '2008-07-13', 'Italian (Italy)', 'it', '1', '";
	$plugin['data']['lang']['gm_lang_rpl']			= "Indicazioni stradali";		
	$plugin['data']['lang']['gm_lang_adr']			= "Indirizzo";
	$plugin['data']['lang']['gm_lang_toh']			= "a qui";
	$plugin['data']['lang']['gm_lang_frh']			= "da qui";
	$plugin['data']['lang']['gm_lang_sea']			= "Ricerca sulle mappa";
	$plugin['data']['lang']['gm_lang_pri']			= "Stampa";
	$plugin['data']['lang']['gm_lang_cle']			= "Rimuova";
	$plugin['data']['lang']['gm_lang_rad']			= "Ricerca";
	$plugin['data']['lang']['gm_lang_dis']			= "Distanza";
	$plugin['data']['lang']['gm_lang_gdr']			= "Indicazioni stradali";
	$plugin['data']['lang']['gm_lang_sad']			= "Indirizzo di partenza";
	$plugin['data']['lang']['gm_lang_ead']			= "Indirizzo di arrivo";
	$plugin['data']['lang']['gm_lang_nor']			= "nessun risultato trovato";
	$plugin['data']['lang']['gm_lang_tabc']			= "Categoria";
	$plugin['data']['lang']['gm_lang_tabr']			= "Indicazioni stradali";
	$plugin['data']['lang']['gm_lang_tabs']			= "Ricerca";
	$plugin['data']['lang']['gm_lang_tdtx']			= "Info";
  $plugin['data']['lang']['gm_lang_tdli']			= "Lista";
	$plugin['data']['lang']['gm_lang_tstx']			= "Info";
  $plugin['data']['lang']['gm_lang_tsli']			= "Lista";
  $sql .= serialize($plugin['data']['lang']);
  $sql .= "'),
(1, '2008-07-13', '2008-07-13', 'German (Germany)', 'de', '1', '";
	$plugin['data']['lang']['gm_lang_rpl']			= "Routenplaner";		
	$plugin['data']['lang']['gm_lang_adr']			= "Adresse";
	$plugin['data']['lang']['gm_lang_toh']			= "nach hier";
	$plugin['data']['lang']['gm_lang_frh']			= "von hier";
	$plugin['data']['lang']['gm_lang_sea']			= "Suchen nach";
	$plugin['data']['lang']['gm_lang_pri']			= "Drucken";
	$plugin['data']['lang']['gm_lang_cle']			= "L&ouml;schen";
	$plugin['data']['lang']['gm_lang_rad']			= "Suche";
	$plugin['data']['lang']['gm_lang_dis']			= "Distanz";
	$plugin['data']['lang']['gm_lang_gdr']			= "Route berechnen";
	$plugin['data']['lang']['gm_lang_sad']			= "Start Adresse";
	$plugin['data']['lang']['gm_lang_ead']			= "Ziel Adresse";
	$plugin['data']['lang']['gm_lang_nor']			= "kein Eintrag gefunden";
	$plugin['data']['lang']['gm_lang_tabc']			= "Kategorie";
	$plugin['data']['lang']['gm_lang_tabr']			= "Routenplaner";
	$plugin['data']['lang']['gm_lang_tabs']			= "Suche";
	$plugin['data']['lang']['gm_lang_tdtx']			= "Info";
  $plugin['data']['lang']['gm_lang_tdli']			= "Listing";
	$plugin['data']['lang']['gm_lang_tstx']			= "Info";
  $plugin['data']['lang']['gm_lang_tsli']			= "Listing";
  $sql .= serialize($plugin['data']['lang']);
  $sql .= "')
";
  if(_dbQuery($sql, 'INSERT')) { //insert values
    echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/icon_accept.gif" alt="" />Database table <b>Language</b> filled with initial values<br />';
  } else {
	  echo '<p class="error"><img src="'.$phpwcms['modules'][$module]['dir'].'img/action_stop.gif" alt="" />Error inserting <b>Google Maps Module Language</b> initial values:</p>';
	  echo '<p>'.@htmlentities(@mysql_error(), ENT_QUOTES, PHPWCMS_CHARSET).'</p>';
  }
} else {
	echo '<p class="error"><img src="'.$phpwcms['modules'][$module]['dir'].'img/action_stop.gif" alt="" />Error creating <b>Google Maps Module Language</b> initial database table:</p>';
	echo '<p>'.@htmlentities(@mysql_error(), ENT_QUOTES, PHPWCMS_CHARSET).'</p>';
}

// ceate resource db table - no changes in v3.0
$sql = "CREATE TABLE IF NOT EXISTS `".DB_PREPEND."phpwcms_googlemaps_resource` (
  `gresource_id` int(11) NOT NULL auto_increment,
  `gresource_created` datetime NOT NULL default '0000-00-00 00:00:00',
  `gresource_changed` datetime NOT NULL default '0000-00-00 00:00:00',
  `gresource_title` text NOT NULL,
  `gresource_link` text NOT NULL,
  `gresource_descr` text NOT NULL,
  `gresource_status` int(1) NOT NULL default '0',
  PRIMARY KEY  (`gresource_id`)
)TYPE=MyISAM"._dbGetCreateCharsetCollation();

if (mysql_fetch_row(mysql_query('SHOW TABLES FROM ' . $GLOBALS['phpwcms']['db_table'] . ' LIKE "%phpwcms_googlemaps_resource"'))) {
  echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/icon_alert.gif" alt="" />Database table <b>Resources</b> already installed</p>';
}else if(_dbQuery($sql, 'CREATE')) { //create table
  echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/icon_accept.gif" alt="" />Database table <b>Resources</b> created</p>';

  $sql = "INSERT INTO `".DB_PREPEND."phpwcms_googlemaps_resource` (
`gresource_created` ,
`gresource_title` ,
`gresource_link` ,
`gresource_descr` ,
`gresource_status`
) VALUES ('2007-12-09', 'Google Maps Icon Shadowmaker', 'http://www.cycloloco.com/shadowmaker/shadowmaker.htm', 'Automatically create a shadow for your image.', '1'),
('2007-12-09', 'Create Icons with cartosoft', 'http://www.cartosoft.com/mapicons/', 'Cartosoft Mapicon Factory. Easily and quickly create high quality PNG icons for your map mashups. But don\'t take our word for it, try it out yourself!', '1'), 
('2007-12-09', 'Sign Up for the Google Maps API', 'http://code.google.com/apis/maps/signup.html', 'The Google Maps API lets you embed Google Maps in your own web pages. You must have a Google Account to get a Maps API key, and your API key will be connected to your Google Account.', '1'),
('2007-12-09', 'The official documentation to this module', 'http://web.casa-loca.com/index.php?googlemaps', 'Here you find all the latest news about this module and a full documentation.', '1'),
('2009-02-13', 'Custom Icons For Markers', 'http://groups.google.com/group/Google-Maps-API/web/examples-tutorials-custom-icons-for-markers', 'Google Groups. An index of sites with tools to create your own markers.', '1')
";
  if(_dbQuery($sql, 'INSERT')) { //insert values
    echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/icon_accept.gif" alt="" />Database table <b>Resources</b> filled with initial values<br />';
    echo 'You have <b>successfully</b> installed the module in the database.</p>';
  } else {
	  echo '<p class="error"><img src="'.$phpwcms['modules'][$module]['dir'].'img/action_stop.gif" alt="" />Error inserting <b>Google Maps Module Resources</b> initial values:</p>';
	  echo '<p>'.@htmlentities(@mysql_error(), ENT_QUOTES, PHPWCMS_CHARSET).'</p>';
  }
} else {
	echo '<p class="error"><img src="'.$phpwcms['modules'][$module]['dir'].'img/action_stop.gif" alt="" />Error creating <b>Google Maps Module Resources</b> initial database table:</p>';
	echo '<p>'.@htmlentities(@mysql_error(), ENT_QUOTES, PHPWCMS_CHARSET).'</p>';
}
  
  //additional infos
	echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/arrow_right.gif" alt="" />Please delete folder <b>setup</b> which can be found inside the module folder here:<br />';
	echo str_replace(PHPWCMS_ROOT, '', $phpwcms['modules'][$module]['path']).'</p>';
	echo '<p><img src="'.$phpwcms['modules'][$module]['dir'].'img/arrow_right.gif" alt="" />Please CHMOD to 777 the folders:<br />';
	echo str_replace(PHPWCMS_ROOT, '', $phpwcms['modules'][$module]['path']).'icons<br />';
  echo str_replace(PHPWCMS_ROOT, '', $phpwcms['modules'][$module]['path']).'kml</p>';
	echo '<p><br /><br /><img src="'.$phpwcms['modules'][$module]['dir'].'img/arrow_right.gif" alt="" />Please don\'t forget to  <b>PayPal</b> me!<img src="'.$phpwcms['modules'][$module]['dir'].'img/arrow_left.gif" alt="" /><br />';

?>